{layout name="layout" /}

<div class="box">
  <!-- <div class="place" id="pageContents">

      <a href="/jstt/bj/" target="_blank" id="pagecurrent">心得笔记</a>

      <a href="/jstt/css3/" target="_blank">CSS3|Html5</a>

      <a href="/jstt/web/" target="_blank">网站建设</a>

      <a href="/news/jsex/" target="_blank">JS经典实例</a>

      <a href="/jstt/t/" target="_blank">推荐工具</a>
  </div> -->
  <div class="blank"></div>
  <div class="blogs">
    {foreach $data.lists as $val}
    <div class="bloglist">
      <h2><a href="/read/{$val.id}"
          title="{$val.title}">{$val.title}</a></h2>
      <p>{$val.summary}</p>
    </div>
    {/foreach}
    {lt name="data.count" value="$data.num_of_per"}
    <p style="text-align: center;">全都给你了, 没有更多啦(╥╯^╰╥).</p>
    {/lt}
    <div class="pagelist">
      <a title="Total record">共&nbsp;<b>{$data.pages}</b>页</a>&nbsp;&nbsp;&nbsp;
      {neq name="page" value="1"}
      <a href="{:url('/lists/'.$cid.'/1')}">首页</a>
      <a href="{:url('/lists/'.$cid.'/'.($page - 1))}">上一页</a>&nbsp;
      {/neq}
      {php}$start = ceil($page/5)*5-4;{/php}
      {for start="$start" end="$start+5" comparison="lt" step="1" name="npage"}
      {eq name="page" value="$npage"}
      <b>{$npage}</b>&nbsp;
      {else}
      <a href="{:url('/lists/'.$cid.'/'.$npage, 'page=')}">{$npage}</a>&nbsp;
      {/eq}
      {/for}
      <a href="{:url('/lists/'.$cid.'/'.($page + 1))}">下一页</a>&nbsp;
      <a href="{:url('/lists/'.$cid.'/'.$data.pages)}">尾页</a>
    </div>
  </div>
  {include file="aside"}
</div>